﻿using star_questionnair.Models;
using star_questionnair.Services.impl;

namespace star_questionnairquestionnair.Services;

public interface IUserService
{
    Task<User> GetByIdAsync(int id);
    Task<User> GetByUserNameAsync(string userName);
    Task<List<User>> GetAllAsync();
    Task AddUserAsync(User user);
    Task UpdateUserAsync(User user);
    Task DeleteUserAsync(int id);
    Task<string> PasswordSignInAsync(string username, string password);
    Task<UserService.ResetPasswordResult> ResetPasswordAsync(int userId, string newPassword,string code);
    Task<bool> VerifyCodeAsync(int userId, string code);
    Task SaveVerificationCodeAsync(int userId, string code);
    Task<List<User>> GetUsersByAgeRangeAsync(int minAge, int maxAge);
    Task<int> CalculateUserAgeAsync(int userId);
    Task<bool> IsUsernameExistAsync(string userName);
}